﻿// Author: Liep Nguyen, 10:44 PM 3/10/2013
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RoutingAlgorithms
{
    class MHA
    {
        public static void GetPath(Topology topology, int s, int d)
        { 
            // Initialize
            foreach (Node node in topology.Nodes)
                foreach (Link link in node.Links)
                    link.Cost = 1;

            int[] trace = Dijikstra.GetShortestPath(topology, s);

            int i = d;
            while (i != s)
            {
                Console.Write("{0} <- ", i);
                i = trace[i];
            }
            Console.Write(s);
        }
    }
}
